package cn.iocoder.yudao.module.diy.controller.admin.diy.vo.other;

import com.fasterxml.jackson.annotation.JsonAlias;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * 自定义页面参数
*/
@Data
public class DiyPageParam implements Serializable {

    private static final long serialVersionUID = 1L;

    @NotNull(message = "pageTitle参数缺失")
    @JsonProperty
    @JsonAlias({"page_title","title"})
    private String pageTitle;

    @NotNull(message = "title参数缺失")
    private String title;

    @NotNull(message = "name参数缺失")
    @JsonProperty
    @JsonAlias({"page_name","name"})
    private String pageName;

    @NotNull(message = "type参数缺失")
    @JsonProperty
    @JsonAlias({"page_type","type"})
    private String pageType;

    @NotNull(message = "template参数缺失")
    private String template;

    @NotNull(message = "mode参数缺失")
    private String mode = "diy";

    @NotBlank(message = "value不能为空")
    @NotNull(message = "value参数缺失")
    @JsonProperty
    @JsonAlias({"page_value","value"})
    private String pageValue;

    @NotNull(message = "isDefault参数缺失")
    @JsonProperty
    @JsonAlias("is_default")
    private Integer isDefault = 0;

    @NotNull(message = "isChange参数缺失")
    @JsonProperty
    @JsonAlias("is_change")
    private Integer isChange = 0;
    //租户id
    private Long tenantId;
    //插件id
    private  Long addonId;
    //业务拓展ID
    private  Long siteId;
    private String addonKey;

}
